/*
 *	file.h: 
 *	File trace record.
 */

#ifndef FTRACE_FILE_H
#define FTRACE_FILE_H

#include <string>


/**
 * Structure keeps track of each file that was accessed by a process at least once.
 */
struct ftrace_file {
	std::string		name;		// file name.
	bool			opened;		// traced process currently has this file open.
	unsigned long long 	nread;		// total bytes read from file.
	unsigned long long	nwritten;	// total bytes written to file.


	/**
 	 * Init blank file record.
	 * @path	File path opened by the traced process.
	 */
	ftrace_file(const char* path) : name(path), opened(true), nread(0), nwritten(0) {};
};


#endif

